// pages/list/list.js
const $api = require("../../api/index.js");

Page({
    data: {
        ranks: []
    },

    onLoad: function (options) {
        this.loadRankListData();
    },
    async loadRankListData() {
        try {
            let res = await $api.loadRankList();
            //console.log(res.data.selected_collections);
            this.setData({
                ranks: res.data.selected_collections
            })
        } catch (error) {

        }
    },
    async onPullDownRefresh() {
        await this.loadRankListData();
        wx.stopPullDownRefresh();
    }
})